package com.smartleanx.module.hrm.dal.mysql.examine.examineRecordRaterIndex;

import java.util.*;

import com.smartleanx.framework.common.pojo.PageResult;
import com.smartleanx.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.smartleanx.framework.mybatis.core.mapper.BaseMapperX;
import com.smartleanx.module.hrm.dal.dataobject.examine.examineRecordRaterIndex.ExamineRecordRaterIndexDO;
import org.apache.ibatis.annotations.Mapper;
import com.smartleanx.module.hrm.controller.admin.examine.examineRecordRaterIndex.vo.*;

/**
 * 维度评分 Mapper
 *
 * @author 
 */
@Mapper
public interface ExamineRecordRaterIndexMapper extends BaseMapperX<ExamineRecordRaterIndexDO> {

    default PageResult<ExamineRecordRaterIndexDO> selectPage(ExamineRecordRaterIndexPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ExamineRecordRaterIndexDO>()
                .eqIfPresent(ExamineRecordRaterIndexDO::getRecordId, reqVO.getRecordId())
                .eqIfPresent(ExamineRecordRaterIndexDO::getFraction, reqVO.getFraction())
                .eqIfPresent(ExamineRecordRaterIndexDO::getDimensionId, reqVO.getDimensionId())
                .eqIfPresent(ExamineRecordRaterIndexDO::getDimensionIndexId, reqVO.getDimensionIndexId())
                .eqIfPresent(ExamineRecordRaterIndexDO::getRaterId, reqVO.getRaterId())
                .eqIfPresent(ExamineRecordRaterIndexDO::getRateComment, reqVO.getRateComment())
                .orderByDesc(ExamineRecordRaterIndexDO::getId));
    }

}